package mo.daliy;

public class L1668 {

    public int maxRepeating(String sequence, String word) {
        int i = 0;
        StringBuilder builder = new StringBuilder(word);
        while (true) {
            if (!sequence.contains(builder.toString())) {
                break;
            }
            builder.append(word);
            i++;
        }
        return i;
    }

}
